<form class="task-log-dialog" ng-submit="$modal.addLog()">
    <div class="modal-header bg-primary">
        <h3 class="modal-title">Add task log</h3>
    </div>
    <div class="modal-body">
        <!-- Intro message -->
        <p ng-if="!$modal.config.isHtml">{{$modal.config.prompt}}</p>
        <p ng-if="$modal.config.isHtml" ng-bind-html="$modal.config.prompt"></p>

        <!-- Task log form -->
        <div class="task log">
            <div class="clearfix">
                <a class="pull-right" href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet" target="_blank">
                    <i class="fa fa-question-circle"></i> Markdown Reference
                </a>
            </div>

            <textarea name="newLog" autofocus="beforeNewTaskLogShow" class="content-box" markdown-editor="$modal.markdownEditorOptions" rows="10" ng-model="$modal.data.message"></textarea>

            <div class="mt-xxxs" control="$modal.state"
                file-chooser="" filemodel="$modal.data.attachment" ng-show="!$modal.state.attachmentCollapsed" preview="false"></div>
        </div>

    </div>
    <div class="modal-footer text-left">
        <button class="btn btn-default" ng-click="$modal.cancel()" type="button">Cancel</button>

        <button class="btn btn-primary pull-right" type="submit" ng-disabled="$modal.state.loading || !$modal.data.message || $modal.data.message.length === 0">
            <i class="glyphicon glyphicon-comment"></i> Add log
        </button>

        <button uib-btn-checkbox btn-checkbox-false="true" btn-checkbox-true="false"
            class="btn btn-default pull-right"
            ng-model="$modal.state.attachmentCollapsed" ng-disabled="$modal.state.loading" type="button">
            <i class="text-default glyphicon glyphicon-paperclip"></i>
            {{$modal.state.attachmentCollapsed ? 'Add' : 'Discard'}}
            attachment
        </button>
    </div>
</form>
